From df4d2e7b701450197d35aa851463e1329b20981c Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 6 May 2008 16:20:24 +0100 Subject: [PATCH] x86 hvm: Support interrupt delivery for PIT channel 0 when in modes 3 and 4. Signed-off-by: Keir Fraser --- xen/arch/x86/hvm/i8254.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c index 493b7317b9..c41783feb0 100644 --- a/xen/arch/x86/hvm/i8254.c +++ b/xen/arch/x86/hvm/i8254.c @@ -206,19 +206,21 @@ static void pit_load_count(PITState *pit, int channel, int val) switch ( s->mode ) { - case 2: - /* Periodic timer. */ - create_periodic_time(v, &pit->pt0, period, 0, 0, pit_time_fired, - &pit->count_load_time[channel]); - break; - case 1: - /* One-shot timer. */ - create_periodic_time(v, &pit->pt0, period, 0, 1, pit_time_fired, - &pit->count_load_time[channel]); - break; - default: - destroy_periodic_time(&pit->pt0); - break; + case 2: + case 3: + /* Periodic timer. */ + create_periodic_time(v, &pit->pt0, period, 0, 0, pit_time_fired, + &pit->count_load_time[channel]); + break; + case 1: + case 4: + /* One-shot timer. */ + create_periodic_time(v, &pit->pt0, period, 0, 1, pit_time_fired, + &pit->count_load_time[channel]); + break; + default: + destroy_periodic_time(&pit->pt0); + break; } } -- 2.30.2